<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 
	<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> 
	<META HTTP-EQUIV="Expires" CONTENT="0"> 
	<title>我要咨询</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="../../css/font_eolqem241z66flxr.css" media="all" />
	<link rel="stylesheet" href="../../css/news.css" media="all" />
	<script src="../../layui/js/angular.js"></script>
	<script type="text/javascript" src="../../layui/layui/jquery-3.2.1.min.js"></script>
	<script type="text/javascript" src="../../layui/layui/GetPath.js"></script>
	<script src="../../layui/layui/layui.js" charset="utf-8"></script>
	<script type="text/javascript" src="../../layui/js/fy.js"></script>
	<script type="text/javascript" src="../../layui/layui/layer.ext.js"></script>
	<script type="text/javascript" src="../../layui/lay/modules/layer.js"></script>
	<script type="text/javascript" src="../../layui/js/jegs.js"></script>
	<style type="text/css">
		.p_left{float:left;}
		.p_right{float:right;}
		.box1 {width:100px; float:left; display:inline;}
		.box0 {width:100px; float:none; display:inline;}
		.box2 {width:100px; float:right; display:inline;text-align: right;}
	</style>
	<style type="text/css">     
    .mask {       
            position: absolute; top: 0px; filter: alpha(opacity=60); 
            z-index: 1002; left: 0px;              
			background:url(../../layui/layui/img/jz.gif) no-repeat center rgba(0,0,0,0.5) ;
		  	background-size:30px 30px;
			background-repeat: no-repeat;
			background: 
        }     
	</style>   
	</head>
<body class="childrenBody">
<div align="center" id="mask" class="mask"></div>  
			<blockquote class="layui-elem-quote news_search">
				<span style="width:80%;display:inline-block;padding-top: 8px">
					<font size="5">在线咨询问题提交</font>
				</span>
				<span>
					<a href="javascript:;" id="wyzx" class="layui-btn  batchDel">返回留言查看</a>
				</span>
			</blockquote>
			<div class="sysNotice col">
					<form class="layui-form">
						<div class="user_right">
						    <label class="layui-form-label">咨询类别:</label>
						    <div class="layui-input-inline" style="width: 22%">
						      <select name="lb" id="lb">
						        <option value="1">贷款咨询</option>
						        <option value="2">提取咨询</option>
						        <option value="3">缴存咨询</option>
						        <option value="4">主任信箱</option>
						        <!-- 1 贷款 2 提取 3 缴存 4 主任信箱 5 其他 -->
						      </select>
						    </div>
						    <br> <br> 
							<div class="layui-inline" >
								<label class="layui-form-label">标题:</label>
								<div class="layui-input-inline">
									<input type="text" id="bt" name="bt" style="width: 230%" autocomplete="off"
										class="layui-input">
								</div>
							</div>
							<br> <br> 
							<div class="layui-inline" >
								<label class="layui-form-label">邮箱:</label>
								<div class="layui-input-inline">
									<input type="text" id="yx" name="yx" style="width: 230%" autocomplete="off"
										class="layui-input">
								</div>
							</div>
							<br> <br> 
							<div class="layui-inline" >
								<label class="layui-form-label">手机号码:</label>
								<div class="layui-input-inline">
									<input type="text" id="sjhm" style="width: 230%" name="sjhm" autocomplete="off"
										class="layui-input">
								</div>
							</div>
							<br> <br> 
							<div class="layui-inline" >
								<label class="layui-form-label">咨询内容:</label>
								<div class="layui-input-inline">
									<textarea id="zxnr" name="zxnr" style="width: 250%;height: 700%" autocomplete="off"
										class="layui-input"></textarea>
								</div>
							</div>
							<br><br>
							<div class="layui-form-item" style="margin:0px;text-align:left;margin-left: 200px;padding:0px;">
						    	<a class="layui-btn" onclick="submit()" >立即提交</a>
						    </div>
						</div>
					</form>
			</div>
	<script type="text/javascript" src="../../layui/layui/layui.js"></script>
	<script type="text/javascript" src="../../js/log.js"></script>
	<script>
		layui.use('layer', function(){
  			var layer = layui.layer;
		});              
	</script>
	<script type="text/javascript">
		function s(){     
        $("#mask").css("height",$(document).height());     
        $("#mask").css("width",$(document).width());     
        $("#mask").show();     
	    }  
	    //隐藏遮罩层  
	    function h(){     
	          
	        $("#mask").hide();     
	    }  
	    $("#wyzx").click(function(){
	    window.location.href=document.referrer;
	    });
	</script>
	<script>
		layui.use(['form', 'layedit', 'laydate'], function(){
		  var form = layui.form
		  ,layer = layui.layer
		  ,layedit = layui.layedit
		  ,laydate = layui.laydate;	  
		});
		function submit(){
			var lb=$("#lb").val();
			var bt=$("#bt").val();
			var yx=$("#yx").val();
			var sjhm=$("#sjhm").val();
			var nr=$("#zxnr").val();
			if(sjhm.length !=11){
					layer.alert('提示：请填写正确的手机号码', {
								      skin: 'layui-layer-molv' //样式类名  自定义样式
								     ,closeBtn: 1    // 是否显示关闭按钮
								      ,anim: 1 //动画类型
								     ,btn: ['确认'] //按钮
								      ,icon: 5    // icon
								     ,btn2:function(){
						}});
			}else if(lb=="" || lb==null){
					layer.alert('提示：请选择咨询类别', {
								      skin: 'layui-layer-molv' //样式类名  自定义样式
								     ,closeBtn: 1    // 是否显示关闭按钮
								      ,anim: 1 //动画类型
								     ,btn: ['确认'] //按钮
								      ,icon: 5    // icon
								     ,btn2:function(){
						}});
			}else if(bt==""||bt==null){
					layer.alert('提示：请输入标题', {
								      skin: 'layui-layer-molv' //样式类名  自定义样式
								     ,closeBtn: 1    // 是否显示关闭按钮
								      ,anim: 1 //动画类型
								     ,btn: ['确认'] //按钮
								      ,icon: 5    // icon
								     ,btn2:function(){
						}});
			}else if(yx==""||yx==null){
					layer.alert('提示：请输入您的邮箱', {
								      skin: 'layui-layer-molv' //样式类名  自定义样式
								     ,closeBtn: 1    // 是否显示关闭按钮
								      ,anim: 1 //动画类型
								     ,btn: ['确认'] //按钮
								      ,icon: 5    // icon
								     ,btn2:function(){
						}});
			}else{
				s();
				$.ajax({
				url : getPath()+'/wsyyt/yw_zxcontroller/wyzx',
				method : 'post',
				dataType : 'JSON',
				data: {'sjhm':sjhm,'lb':lb,'bt':bt,'yx':yx,'nr':nr},
				success : function(result) {
				h();
				var code = result.code;
					if(code==0){
						layer.alert('提示：发送成功', {
								      skin: 'layui-layer-molv' //样式类名  自定义样式
								     ,closeBtn: 1    // 是否显示关闭按钮
								      ,anim: 1 //动画类型
								     ,btn: ['确认'] //按钮
								      ,icon: 6    // icon
								     ,yes:function(){
										window.location.href=document.referrer;
								     }});
					}else{				
						layer.alert('提示：'+result.CW, {
								      skin: 'layui-layer-molv' //样式类名  自定义样式
								     ,closeBtn: 1    // 是否显示关闭按钮
								      ,anim: 1 //动画类型
								     ,btn: ['确认'] //按钮
								      ,icon: 5    // icon
								     ,btn2:function(){
										
						}});
					};
				}
			});
			}
		};
	</script>
</body>
</html>